package cn.com.kisen.spring.schedule;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import cn.com.kisen.spring.service.UserService;


/**
 * 
 *
 * @author jiangz
 * @version 1.0 Created on 2019年10月23日 上午11:04:16
 */
@Component
@Configurable
@EnableScheduling
public class ManufacturingSimulator {

	@Autowired
	private UserService userService;
	
	@Scheduled(cron = "0 */1 *  * * * ")
	public void reportCurrentByCron() {
		System.out.println(userService.loadById(1L));
	}
}
